# -*- coding: UTF-8 -*-

import os, hashlib, datetime

class utils:

    class md5(object):

        def encode(data):
            m = hashlib.md5()
            m.update(data.encode(encoding='UTF-8'))
            return m.hexdigest()


    class time(object):

        def tick():
            return "{0:%y%m%d%H%M%S%f}".format(datetime.datetime.now())

        def get():
            return "{0:%Y-%m-%d %H:%M:%S}".format(datetime.datetime.now())


    class uuid:

        def get():
            src = "{0:%y%m%d%H%M%S%f}".format(datetime.datetime.now())
            m = hashlib.md5()
            m.update(src.encode('utf-8'))
            return m.hexdigest()



if __name__ == '__main__':

    print(utils.time.get())
